package com.wander.designCreational.singleton.enumsingleton;

/**
 * @Author : WDYin
 * @Date : 2020/5/8
 * @Description :
 */
public enum EnumSingleton {
    INSTANCEzx;
    private Singleton singleton;

    EnumSingleton() {
        singleton = new Singleton();
    }

    public Singleton getSingleton() {
        return singleton;
    }

    public static void main(String[] args) {
        EnumSingleton instance = EnumSingleton.INSTANCEzx;
        System.out.println(instance.getSingleton());
    }
}
